#include "../../include/CacheTask.h"
#include "../../include/CacheManager.h"
#include <iostream>
#include <sys/timerfd.h>
#include <unistd.h>
#include <stdint.h>
#include <cstring>
#include <vector>
#include <sys/epoll.h>
#include <unistd.h>
#include <string.h>
#include <string>
#include <iomanip>
#include <chrono>
#include <ctime>

using std::string;
using std::cout;
using std::endl;

void CacheTask::process()
{
    auto start = std::chrono::system_clock::now();
    std::time_t currentTime = std::chrono::system_clock::to_time_t(start);
    //cout << "time: " << std::put_time(std::localtime(&currentTime), "%Y-%m-%d %H:%M:%S")<< " cache update"<< endl;

    CacheManager::getInstance()->periodicUpdateCaches();
}